package com.ruoyi.market.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName po_product
 */
@TableName(value ="po_product")
@Data
public class PoProduct1 implements Serializable {
    /**
     * 商品id
     */
    @TableId(type = IdType.AUTO)
    private Integer productId;

    /**
     * 商品型号名称
     */
    private String productModel;

    /**
     * 商品类型id
     */
    private Integer poTypeId;

    /**
     * 商品单价
     */
    private Double price;

    /**
     * 计量单位
     */
    private String unit;

    /**
     * 厂商id
     */
    private Integer poFirmId;

    /**
     * 创建人
     */
    private Integer sysCreateUserId;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 商品状态(0:不可用；1:可用)
     */
    private String status;

    /**
     * 品牌id
     */
    private Integer poBrandId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PoProduct1 other = (PoProduct1) that;
        return (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
            && (this.getProductModel() == null ? other.getProductModel() == null : this.getProductModel().equals(other.getProductModel()))
            && (this.getPoTypeId() == null ? other.getPoTypeId() == null : this.getPoTypeId().equals(other.getPoTypeId()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getUnit() == null ? other.getUnit() == null : this.getUnit().equals(other.getUnit()))
            && (this.getPoFirmId() == null ? other.getPoFirmId() == null : this.getPoFirmId().equals(other.getPoFirmId()))
            && (this.getSysCreateUserId() == null ? other.getSysCreateUserId() == null : this.getSysCreateUserId().equals(other.getSysCreateUserId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getPoBrandId() == null ? other.getPoBrandId() == null : this.getPoBrandId().equals(other.getPoBrandId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
        result = prime * result + ((getProductModel() == null) ? 0 : getProductModel().hashCode());
        result = prime * result + ((getPoTypeId() == null) ? 0 : getPoTypeId().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getUnit() == null) ? 0 : getUnit().hashCode());
        result = prime * result + ((getPoFirmId() == null) ? 0 : getPoFirmId().hashCode());
        result = prime * result + ((getSysCreateUserId() == null) ? 0 : getSysCreateUserId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getPoBrandId() == null) ? 0 : getPoBrandId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", productId=").append(productId);
        sb.append(", productModel=").append(productModel);
        sb.append(", poTypeId=").append(poTypeId);
        sb.append(", price=").append(price);
        sb.append(", unit=").append(unit);
        sb.append(", poFirmId=").append(poFirmId);
        sb.append(", sysCreateUserId=").append(sysCreateUserId);
        sb.append(", createTime=").append(createTime);
        sb.append(", status=").append(status);
        sb.append(", poBrandId=").append(poBrandId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}